package com.itheima.itcasthealth.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface CheckGroupAndItemMapper {
    @Insert("insert into t_checkgroup_checkitem values (#{checkgroupId},#{checkitemId})")
    void addCheckgroupAndCheckitem(@Param("checkgroupId") Integer id, @Param("checkitemId") Integer checkitemId);

    @Select("select checkitem_id from t_checkgroup_checkitem where checkgroup_id = #{id}")
    Integer[] findCheckItemIdsByCheckGroupId(Integer id);

    @Delete("delete from t_checkgroup_checkitem where checkgroup_id = #{id}")
    void deleteByCheckGroupId(Integer id);
}
